home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 03 / 2 / DISK0326.ZIP / SCNMAP.DOC < prev    next >
Text File  |  1983-02-24  |  7KB  |  154 lines

  1.             DOCUMENTATION FOR SCNMAP.BAS
  2.  
  3.                 Copyright 1983 By Michael Csontos
  4.                           3228 Livonia Center Road
  5.                           Lima, New York 14485
  6.  
  7.  
  8.             INTRODUCTION
  9.  
  10.     If you are writing programs involving relatively fancy screen
  11. layouts it is very helpful to have a paper chart so you can sketch the
  12. appearance of the screen before writing code to print it.  Such charts 
  13. can be purchased ($15.00 for catalog #B73098 from Moore for 10 pads of 50)
  14. but since you are not likely to need 500 of them, it is worthwhile to have
  15. your printer make them one at a time.
  16.  
  17.     This program will print a form on 8½ x 11" paper for laying out 
  18. either 40 column or 80 column screens. It will also print forms that show
  19. the addresses in the color graphics board memory for each character in the
  20. alphanumeric mode for both screen widths.
  21.  
  22.  
  23.     This program has printer control commands for the EPSON MX-80 printer
  24. and may not function with other printers. 
  25.  
  26.  
  27.             PROGRAM OPERATION
  28.  
  29.     When you run the program you will be presented with a choice of four
  30. options; 40 or 80 column charts, either blank or filled. Simply make sure the
  31. printer is ready and press a number.  The printer will print out the form and
  32. then the program will rerun itself so that you can immediately choose another
  33. option. Press <Esc> at this time to end the program.
  34.  
  35.     To stop printing in the middle of a chart, take the printer off-line.
  36. The program will wait for the printer to go back on-line. To end the program
  37. in the middle of printing, use <Ctrl>+<Break>. Since the program reinitialises
  38. the printer and there is only one keystroke to enter, there was no reason
  39. for a more complicated ending sequence.
  40.  
  41.     Since the program uses the [INKEY$] function to enter its one
  42. character and doesn't have an [END] statement, the keyboard buffer will hold
  43. up to 15 entries until they are used by the program. Thus if you want three
  44. copies of a blank 40 column form just press <1>, <1>, <1> and the printer
  45. will print three forms (assuming continuous paper forms) and then wait for
  46. more instructions. This is especially useful for filled forms since they
  47. take a very long time to print and you may want to leave the printer.
  48.  
  49.     It is recommended that you use a weak ribbon to print the filled forms
  50. as this will make the very small numbers easier to read and allow you to
  51. draw your layout over the form.
  52.  
  53.  
  54.             APPLICATIONS
  55.  
  56.     In BASIC the command [LOCATE l,c] can be used to place the cursor
  57. anywhere on the screen. You can lay out the format you want to use for data on
  58. the screen using the blank forms printed by this program, then read off the
  59. line number l (1 to 25) and the column number c (1 to 40 or 80) from the border
  60. of the form for the first character of what you want to print. Then use the
  61. program line: LOCATE l,c:PRINT "dd.........dddd" to put your phrase or data
  62. there.
  63.  
  64.     Line 25 has special characeristics in that the function key functions
  65. are normally displayed there. To use that line, you must have used the command
  66. [KEY OFF] somewhere before you use the [LOCATE 25,c] command.
  67.  
  68.     
  69.     Another way to manipulate the screen display is to work directly 
  70. with the memory that is used to refresh the screen display. This can be done
  71. with [PEEK (n)] and [POKE n,data] commands. 
  72.  
  73.     The circuit board that controls the CRT display has its own memory.
  74. For the Color-Graphics Adapter this consists of 16k of memory with a starting
  75. address of B8000 in hexadecimal notation. To tell BASIC that you want to
  76. access that block of memory you must use the command [DEF SEG=&HB800]. this
  77. sets things up so that the numbers (n) that you use in a [PEEK (n)] or
  78. [POKE n,data] command will refer to the memory on the color adapter.  
  79. Note: The IBM Monochrome adapter uses a different memory starting address
  80. so addresses from the forms will not work for it.
  81.  
  82.     Each character location on the screen uses two bytes of memory
  83. in this display buffer.  The first one is the character itself, in ASCII, as
  84. listed in the Appendix G of the IBM BASIC manual. The numbers in the filled
  85. 80 column chart are the addresses of these characters, as are the lower of
  86. the two numbers in the blocks of the 40 column filled form.  For example, 
  87. the command line LOCATE 23,1:PRINT CHR$(PEEK(86)), if entered in the width 40
  88. mode after [DEF SEG=&HB800] has been executed, will print in the first column
  89. of line 23 whatever character is found at the 4th column of line 2 of the
  90. screen.
  91.  
  92.     You could get the same result with POKE 1760,PEEK(86) under the same
  93. conditions. While the addresses can be calculated from line and column
  94. numbers, it is very convienent to be able to look them up and enter them
  95. directly from your screen layout.
  96.  
  97.     The information in the other address for each location determines how
  98. the character looks on the screen. It is divided into two halves; foreground
  99. and background. Three bits in each half control the color, while the fourth
  100. determines intensity for the foreground or blinking for the background.
  101. Since BASIC does not support binary variables, you must understand
  102. hexadecimal notation to control color with [POKE n,data] commands. However
  103. for black-and-white alphanumeric applications a table will allow you to 
  104. control the characters appearances. In each case use the command [POKE n,&Hdd]
  105. where n comes from the filled form.
  106.  
  107.     dd        appearance
  108.  
  109.     07        NORMAL CHARACTER
  110.  
  111.     0F        HIGH INTENSITY CHARACTER
  112.  
  113.     70        REVERSE VIDEO CHARACTER
  114.  
  115.     87        BLINKING CHARACTER
  116.  
  117.     00        BLANK (WITHOUT ERASING THE CHARACTER)
  118.  
  119.     77        WHITE (WITHOUT ERASING THE CHARACTER)
  120.  
  121.     
  122.     Thus if you want to convert the 2nd line of an 80 character display
  123. to high intensity you could use the line:
  124.  
  125.     FOR N=161 TO 319 STEP 2:POKE N,&H0F:NEXT N
  126.  
  127. remembering that [DEF SEG=&HB00] must have been used somewhere before that.
  128.  
  129.     You can experiment with the other possible attributes from 00 to FF
  130. to see what they do or refer to pages 2-49 to 2-52 of the IBM Technical
  131. Reference Manual.
  132.  
  133.  
  134.             ---***---
  135.  
  136.     The program SCNMAP.BAS and the file SCNMAP.DOC are
  137.     made freely available for non-exclusive distribution
  138.     to members of the Picture City Personal Computer 
  139.     Programmers Club and through software exchange with
  140.     other users' groups as long as the author and (PC)^3
  141.     are fully credited.
  142.  
  143.  
  144.  
  145.  
  146.         This disk copy was originally provided by "The Public Library",
  147.         the software library of the Houston Area League of PC Users.
  148.  
  149.         Programs are available from the Public Library at $2 per disk
  150.         on user-provided disks.  To get a listing of the disks in the
  151.         Public Library, send a self-addressed, stamped envelope to
  152.  
  153.              Nelson Ford,  P.O.Box 61565,  Houston, TX 77208.
  154.